<?php

$TCA['inquiry_question'] = array(
	'ctrl' => $TCA['inquiry_question']['ctrl'],
	'interface' => array(
		'showRecordFieldList' => 'pid,hidden,starttime,endtime,question,answers,hits,sys_language_uid,l18n_parent,l18n_diffsource'
	),
	'types' => array(
		'1' => array('showitem' => 'pid,hidden,starttime,endtime,question,hits,answers')
	),
	'palettes' => array(
		'1' => array('showitem' => '')
	),
	'columns' => array(
		'hidden' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.hidden',
			'config'  => array(
				'type' => 'check',
			),
		),
		'starttime' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.starttime',
			'config'  => array(
				'type'		=> 'input',
				'size'		=> 15,
				'eval'		=> 'datetime,required',
				'default'	=> time(),
			),
		),
		'endtime' => array(
			'exclude'	=> 0,
			'label'		=> 'LLL:EXO:inquiry/Resources/Private/Language/locallang_db_question.xml:question.endtime',
			'config'	=> array(
				'type'		=> 'input', 
				'size'		=> 15, 
				'eval'		=> 'datetime,required', 
				'default'	=> strtotime('+1 week'),
			),
		),
		'question' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.question',
			'config'  => array(
				'type' => 'input',
				'size' => 128,
				'eval' => 'trim,required',
			),
		),
		'hits' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.hits',
			'config'  => array(
				'type' => 'none',
				'size' => 10,
			),
		),
		'sys_language_uid' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.sys_language_uid',
			'config'  => array(
				'type' => 'select',
				'foreign_table' => 'sys_language',
				'foreign_table_where' => ' ORDER BY sys_language.title',
			),
		),
		'l18n_parent' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.l18n_parent',
			'config'  => array(
				'type' => 'input',
				'size' => 4,
				'eval' => 'int',
			),
		),
		'l18n_diffsource' => array(
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.l18n_diffsource',
			'config'  => array(
				'type' => 'input',
				'size' => 128,
				'eval' => 'trim',
			),
		),
		'answers' => array (
			'exclude' => 0,
			'label'   => 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question.answers',
			'config' => Array (
				'type' => 'inline',
				'foreign_table' => 'inquiry_answer',
				'foreign_field' => 'fk_question_id',
				'foreign_sortby' => 'sorting',
				'minitems' => 1,
				'maxitems' => 100,
				'appearance' => Array(
					'collapseAll' => 1,
					'expandSingle' => 1,
				),
			),
		),
	),
);

?>